home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / dev / misc / addtext.readme < prev    next >
Encoding:
Text File  |  1996-05-05  |  4.7 KB  |  231 lines

  1. Short: ADDTEXT - Generates script code, src inc
  2.  
  3.    Uploader: Anthony.Peck@Radford.act.edu.au
  4.  
  5.    Author:   Anthony Peck
  6.  
  7.    Type:     dev/misc
  8.  
  9.  
  10.  
  11.    *****************************************************************
  12.  
  13.    *                                                               *
  14.  
  15.    *       ADDTEXT                                                 *
  16.  
  17.    *       -------                                                 *
  18.  
  19.    *                                                               *
  20.  
  21.    *       Adds appropriate print commands depending on required   *
  22.  
  23.    *       code output.  User can select from Pascal, C or script  *
  24.  
  25.    *       output.                                                 *
  26.  
  27.    *                                                               *
  28.  
  29.    *       Author: A N Peck                                        *
  30.  
  31.    *                                                               *
  32.  
  33.    *       Date: 09 Feb 1995                                       *
  34.  
  35.    *                                                               *
  36.  
  37.    ***************************************************************** 
  38.  
  39.  
  40.  
  41.    Many times have I written text for programs or script files, and then
  42.  
  43.    had to add the printf, writeln or echo commands by hand.  I decided to
  44.  
  45.    automate the process and AddText was born!
  46.  
  47.  
  48.  
  49.    Example
  50.  
  51.    -------
  52.  
  53.  
  54.  
  55.    Let's say we have a text file called "Sheep.pme" which contains the
  56.  
  57.    following tortured prose...
  58.  
  59.  
  60.  
  61.         Little Bo Peep was a weird little girl
  62.  
  63.  
  64.  
  65.              Who's main love interest was ewe
  66.  
  67.  
  68.  
  69.         How extraordinary this small canary
  70.  
  71.  
  72.  
  73.         Which it's bound tutu
  74.  
  75.                            
  76.  
  77.    ...which we would like to have in a program or script file.  Selecting
  78.  
  79.    the Script option would produce a file which looks like...
  80.  
  81.  
  82.  
  83.         ; Courtesy of ADDTEXT - A N Peck (1995)
  84.  
  85.         
  86.  
  87.         echo ""
  88.  
  89.         echo "        Little Bo Peep was a weird little girl"
  90.  
  91.         echo ""
  92.  
  93.         echo "             Who's main love interest was ewe"
  94.  
  95.         echo ""
  96.  
  97.         echo "        How extraordinary this small canary"
  98.  
  99.         echo ""
  100.  
  101.         echo "        Which it's bound tutu"
  102.  
  103.         echo ""
  104.  
  105.  
  106.  
  107.    You could now execute this script file to produce the original text.
  108.  
  109.  
  110.  
  111.    The Pascal version would read...
  112.  
  113.  
  114.  
  115.         { Courtesy of ADDTEXT - A N Peck (1995) }
  116.  
  117.         
  118.  
  119.         Writeln ('');
  120.  
  121.         Writeln ('        Little Bo Peep was a weird little girl');
  122.  
  123.         Writeln ('');
  124.  
  125.         Writeln ('             Who''s main love interest was ewe');
  126.  
  127.         Writeln ('');
  128.  
  129.         Writeln ('        How extraordinary this small canary');
  130.  
  131.         Writeln ('');
  132.  
  133.         Writeln ('        Which it''s bound tutu');
  134.  
  135.         Writeln ('');
  136.  
  137.  
  138.  
  139.    Note that the extra apostrophes have been added.
  140.  
  141.  
  142.  
  143.    Finally the C option produces...
  144.  
  145.  
  146.  
  147.         /* Courtesy of ADDTEXT - A N Peck (1995) */
  148.  
  149.         
  150.  
  151.         Printf ("\n");
  152.  
  153.         Printf ("        Little Bo Peep was a weird little girl\n");
  154.  
  155.         Printf ("\n");
  156.  
  157.         Printf ("             Who's main love interest was ewe\n");
  158.  
  159.         Printf ("\n");
  160.  
  161.         Printf ("        How extraordinary this small canary\n");
  162.  
  163.         Printf ("\n");
  164.  
  165.         Printf ("        Which it's bound tutu\n");
  166.  
  167.         Printf ("\n");
  168.  
  169.         
  170.  
  171.    And that's all it does!  No washing of dishes or carrying out of dirty
  172.  
  173.    linen, but perhaps a bit easier to insert text into your next program or
  174.  
  175.    script file.
  176.  
  177.  
  178.  
  179.    The program was written in Assembly with help from Hextract (Chas A
  180.  
  181.    Wyndham), EdwordPro (Martin Reddy), PhxAss/PhxLnk (Frank Wille),
  182.  
  183.    Convbrush (David Kinder), Iconian (Chad Randall), DPaint (Electronic
  184.  
  185.    Arts), and some others I've forgotten.  The source is provided for your
  186.  
  187.    amusement.
  188.  
  189.  
  190.  
  191.    I hope you find this program useful.  I take no responsibility for it's
  192.  
  193.    actions but it is freeware!  Enjoy...
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                           Anthony N Peck
  200.  
  201.  
  202.  
  203.                           68 Woralul St
  204.  
  205.  
  206.  
  207.                           Waramanga ACT 2611
  208.  
  209.  
  210.  
  211.                           Australia
  212.  
  213.  
  214.  
  215.                           E-mail: Anthony.Peck@Radford.act.edu.au
  216.  
  217.  
  218. ============================= Archive contents =============================
  219.  
  220. Original  Packed Ratio    Date     Time    Name
  221. -------- ------- ----- --------- --------  -------------
  222.      564     282 50.0% 24-Feb-96 22:03:24  AddText.info
  223.     4036    3759  6.8% 24-Feb-96 21:57:46 +AddText
  224.    90758   16026 82.3% 24-Feb-96 22:01:24 +AddText.a
  225.     2375     569 76.0% 24-Feb-96 22:03:44 +AddText.a.info
  226.     3872    1159 70.0% 24-Feb-96 22:10:54 +AddText.doc
  227.     2375     553 76.7% 24-Feb-96 22:03:36 +AddText.doc.info
  228.     2358     573 75.6% 24-Feb-96 22:03:24 +Addtext.info
  229. -------- ------- ----- --------- --------
  230.   106338   22921 78.4% 07-Mar-96 01:27:30   7 files
  231.